package com.example.mbl.dao;

import com.example.mbl.entity.News;
import com.example.mbl.result.business.NewsPageResult;
import com.example.mbl.result.business.NewsResult;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface NewsMapper {

    List<News> searchItemsByKeyWord(String keyword);

    int deleteByPrimaryKey(String newsid);

    int insert(News record);

    int insertSelective(News record);

    News selectByPrimaryKey(String newsid);

    int updateByPrimaryKeySelective(News record);

    int updateByPrimaryKey(News record);

    List<NewsPageResult> getNewsList(@Param("newstype") String newstype,
                                     @Param("newsdate") String newsdate,
                                     @Param("newstitle") String newstitle,
                                     @Param("start") int start,
                                     @Param("pagesize") int pagesize);

    NewsResult getNewsItem(String newsid);
    String findTopNews();
    int setTopNews(String newsid);
}